/*
 *
13988888888打给： 010-12345
MP4正在播放: 我和我的祖国
在鸿蒙正在运行: 王者荣耀
 */

#include <iostream>
using namespace std;
class Phone{
	private:
		string m_number;
	public:
		Phone(const string& number){
			m_number = number;
		}
		void call(const string& number){
			cout << m_number << "打给： " << number << endl;
		}
};
class Player{
	public:
		Player(const string& media){
			m_media = media;
		}
		void play(const string& music){
			cout << m_media << "正在播放: " << music << endl;
		}
	private:
		string m_media ; //播放器的名称
};
class Computer{
	private:
		string m_os; //使用的操作系统
	public:
		Computer(const string& os):m_os(os){
		}
		void run(const string& app){
			cout << "在" << m_os << "正在运行: " << app << endl;
		}
};
/*典型的多重继承*/
class SmartPhone:public Phone, public Player, public Computer{
	public:
		SmartPhone(const string& number, const string& media, const string& os):Phone(number), Player(media), 
		Computer(os){
		}
};
int main(void){
	SmartPhone huawei("13988888888", "MP4", "鸿蒙");
	huawei.call("010-12345");
	huawei.play("我和我的祖国");
	huawei.run("王者荣耀");
	return 0;
}
